package com.wangjiacai.hqlQuery.repository;


import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface BaseRepository {

    <T> T save(T t);

    <T> T get(String hql,Class<T> T);

    <T> T get(String hql, Object object,Class<T> T);

    <T> T get(String hql, Map<String, Object> params,Class<T> T);

    <T> List<T> find(String hql,Class<T> T);

    <T> List<T> find(String hql, Map<String,Object> map,Class<T> T);

    <T> List<T> find(String hql, Object object,Class<T> T);

    <T> List<T> find(String hql, Map<String,Object> map, Pageable pageable, Class<T> T);

    <T> List<T> find(String hql, Object object, Pageable pageable, Class<T> T);

    <T> List<T> nativeFind(String sql,Class<T> T);

    <T> List<T> nativeFind(String sql, Map<String,Object> map,Class<T> T);

    <T> List<T> nativeFind(String sql, Object object,Class<T> T);

    <T> List<T> nativeFind(String sql, Map<String,Object> map, Pageable pageable, Class<T> T);

    <T> List<T> nativeFind(String sql, Object object, Pageable pageable, Class<T> T);

    long count(String hql);

    long count(String hql, Object object);

    long count(String hql, Map<String, Object> params);

    long nativeCount(String sql);

    long nativeCount(String sql, Object object);

    long nativeCount(String sql, Map<String, Object> params);

    void execute(String hql);

    void execute(String hql,Object object);

    void execute(String hql, Map<String, Object> params);
}
